import request from '@/utils/request'

const base_api = '/admin/product/categoryBrand'

export const GetCategoryBrandPageList = (page, limit, categoryBrand) => {
  return request({
    url: `${base_api}/list/${page}/${limit}`,
    method: 'get',
    params: categoryBrand,
  })
}

export const SaveCategoryBrand = categoryBrand => {
  return request({
    url: `${base_api}/save`,
    method: 'post',
    data: categoryBrand,
  })
}

export const UpdateCategoryBrand = categoryBrand => {
  return request({
    url: `${base_api}/update`,
    method: 'put',
    data: categoryBrand,
  })
}

export const DeleteCategoryBrand = id => {
  return request({
    url: `${base_api}/deleteById/${id}`,
    method: 'delete',
  })
}
